package cate.game.train.gem.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTrain;
import cate.game.res.MixRes;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "宝石重铸的请求")
@OperationSetter(GDOperation.GEM_REFORGE)
public class GemReforgeReq implements MsgInput {
    @NoteField("要重铸的宝石们")
    public MixRes gems;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = game.train.gem.reforge(cc.getRole(), gems);
        game.notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTrain.GEM_REFORGE_REQ;
    }
}
